import { createRouter, createWebHistory } from 'vue-router'
import Login from '@/pages/Login/index.vue'
import Layout from '@/pages/Spreadsheet/Layout/index.vue'

import { Star, PieChart, Guide } from '@element-plus/icons-vue';


const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login
  },
  {
    path: '/layout',
    name: 'Layout',
    component: Layout,
    children: [
      {
        path: '/tables',
        name: 'Tables',
        icon: Guide,
        component: () => import('@/pages/Tables/index.vue')
      },
      // 电子表格
      {
        path: '/handSonTable',
        name: 'HandSonTable',
        icon: Star,
        component: () => import('@/pages/Spreadsheet/HandSonTable/index.vue')
      },
      {
        path: '/agGrid',
        name: 'AGGrid',
        icon: Star,
        component: () => import('@/pages/Spreadsheet/AGGrid/index.vue')
      },
      {
        path: '/vueEasyTable',
        name: 'VueEasyTable',
        icon: Star,
        component: () => import('@/pages/Spreadsheet/VueEasyTable/index.vue')
      },
      {
        path: '/luckysheet',
        name: 'Luckysheet',
        icon: Star,
        component: () => import('@/pages/Spreadsheet/Luckysheet/index.vue')
      },
      // 数据可视化
      {
        path: '/agCharts',
        name: 'AgCharts',
        icon: PieChart,
        component: () => import('@/pages/Spreadsheet/AgCharts/index.vue')
      },
      {
        path: '/echarts',
        name: 'Echarts',
        icon: PieChart,
        component: () => import('@/pages/Spreadsheet/Echarts/index.vue')
      },
      {
        path: '/highEcharts',
        name: 'HightEcharts',
        icon: PieChart,
        component: () => import('@/pages/Spreadsheet/HighCharts/index.vue')
      },
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
